uc_ajax_cart includes a file 'uc_module_add_to_cart.php' which has implementations of hook_add_to_cart() using the namespaces of other modules (uc_stock and uc_attribute). Should these modules ever implement this hook, they will conflict with uc_ajax_cart due to redefinition of the function. uc_ajax_cart should instead move the code from these functions to its own namespace, uc_ajax_cart_add_to_cart().
However, the stock management portion of uc_ajax_cart_add_to_cart() should be considered for removal in my opinion, as it's out of scope for this module. Users should install something like uc_out_of_stock to prevent out of stock products from begin ordered if they want this, as not all want to prevent customers from ordering out of stock products. See. As well, note that the current implementation is not completely functional; db_affected_rows() on SELECT operations is database vendor-sepecific and only guaranteed to work on INSERT, UPDATE and DELETE operations. A COUNT query, or checking if db_fetch_object() returned FALSE, should be used instead to verify if any rows were returned.
uc_cart_links has an upstream issue about the required attributes being added to cart bug:. When the patches there get committed we could remove uc_ajax_cart_add_to_cart() entirely from the codebase.